<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="/world/script/json2.js"></script>
<script type="text/javascript" src="/world/script/jquery.js"></script>
<script type="text/javascript">
//ID 중복체크
$(document).ready(function(){ //페이지가 로딩될때
	$("#beerInfoId").on("keyup",function(){
		$.ajax({
			type:"post",
			url:"${initParam.rootPath}/adminBeer/beerIdCheck.do",
			data:{"beerInfoId":$("#beerInfoId").val()},
			dataType:"json",
			success:function(result){//result = map에 있는 값 , 넘어온 값
				$("#msg").html("<font color='green'>"+result.message+"</font>");
			}
				
		});
	});//on
});

</script>
<title>Insert title here</title>
<body>

<form action="${initParam.rootPath }/adminBeer/insertAdminBeer.do" method="post">
	<table align="center">
	<tr>
		 <td>ID :</td>
		 <td><input type="text" id="beerInfoId" name="beerInfoId"/><span id='msg'></span></td>
	</tr>
	<tr>
		<td>이름 :</td> 
		<td><input type="text" id="beerInfoName" name="beerInfoName"/></td>
	</tr>
	<tr>
		<td>영어이름 :</td> 
		<td><input type="text" id="beerInfoEngName" name="beerInfoEngName"/></td>
	</tr>
	<tr>
		<td>알콜 :</td> 
		<td><input type="text" id="alcohol" name="alcohol"/></td>
	</tr>
	<tr>
		<td>가격 강도 :</td> 
		<td><input type="text" id="price" name="price" maxlength="1"/></td>
	</tr>
	<tr>	
		<td>제조사 :</td>
		<td><input type="text" name="manufacturer"/></td>
	</tr>
	<tr>		
		<td>제조국가 :</td>
		<td><input type="text" name="country"/></td>
	</tr>
	<tr>	 	
		<td>단맛 :</td>
		<td><input type="text" id="sweetness" name="sweetness" maxlength="1"/></td>
	</tr>
	<tr>
		<td>쓴맛 :</td>
		<td><input type="text" id="bitters" name="bitters" maxlength="1"/></td>
	</tr>
	<tr>
		<td>청량감 :</td>
		<td><input type="text" id="sensationOfRefreshment" name="sensationOfRefreshment" maxlength="1"/></td>
	</tr>
	<tr>
		<td>색 :</td>
		<td><input type="text" id="color" name="color" maxlength="1"/></td>
	</tr>
	<tr>
		<td>이미지 주소 :</td>
		<td><input type="text" id="imageUrl" name="imageUrl" /></td>
	</tr>
	<tr>
	<td><input type="submit" value="추가"/>
	       <input type="reset" value="다시 작성"/></td>
	</tr>
	</table>
</form>

</body>
</html>